        <!DOCTYPE html>
        <html>
        <head>
                <meta charset="utf-8">
        <title>FixtureDef class / box2d Library / Dart Documentation</title>
        <link rel="stylesheet" type="text/css"
            href="../styles.css">
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico">
        
        </head>
        <body data-library="box2d" data-type="FixtureDef">
        <div class="page">
        <div class="header">
          <a href="../index.html"><div class="logo"></div></a>
          <a href="../index.html">Dart Documentation</a>
         &rsaquo; <a href="../box2d.html">box2d</a> &rsaquo; <a href="../box2d/FixtureDef.html">FixtureDef</a>        <div id="search-box">
          <input type="search" name="q" id="q" autocomplete="off"
              class="search-input" placeholder="Search API">
        </div>
        
      </div>
      <div class="drop-down" id="drop-down"></div>
      
        <div class="nav">
        
</div>
<div class="content">
        <h2><strong>FixtureDef</strong>
          class
        </h2>
        
<button id="show-inherited" class="show-inherited">Hide inherited</button>
<div class="doc">
<pre class="source">
class FixtureDef {
 /**
  * The shape to use in the fixture. This must be set.
  */
 Shape shape;

 /**
  * Use this to store application specific fixture data.
  */
 Object userData;

 /**
  * The friction coefficient, usually in the range [0,1].
  */
 num friction;

 /**
  * The restitution (elasticity) usually in the range [0,1].
  */
 num restitution;

 /**
  * The density, usually in kg/m^2
  */
 num density;

 /**
  * A sensor shape collects contact information but never generates a collision
  * response.
  */
 bool isSensor;

 /**
  * Contact filtering data;
  */
 Filter filter;

 /**
  * Constructs a new FixtureDef with default values.
  */
 FixtureDef() :
   shape = null,
   userData = null,
   friction = 0.2,
   restitution = 0,
   density = 0,
   filter = new Filter(),
   isSensor = false {
   // Setup the filter.
   filter.categoryBits = 0x0001;
   filter.maskBits = 0xFFFF;
   filter.groupIndex = 0;
 }
}
</pre>
</div>
<div>
<h3>Constructors</h3>
<div class="method"><h4 id="FixtureDef">
<button class="show-code">Code</button>
new <strong>FixtureDef</strong>() <a class="anchor-link" href="#FixtureDef"
              title="Permalink to FixtureDef.FixtureDef">#</a></h4>
<div class="doc">
<p>Constructs a new FixtureDef with default values.</p>
<pre class="source">
FixtureDef() :
 shape = null,
 userData = null,
 friction = 0.2,
 restitution = 0,
 density = 0,
 filter = new Filter(),
 isSensor = false {
 // Setup the filter.
 filter.categoryBits = 0x0001;
 filter.maskBits = 0xFFFF;
 filter.groupIndex = 0;
}
</pre>
</div>
</div>
</div>
<div>
<h3>Properties</h3>
<div class="field"><h4 id="density">
<button class="show-code">Code</button>
num         <strong>density</strong> <a class="anchor-link"
            href="#density"
            title="Permalink to FixtureDef.density">#</a>
        </h4>
        <div class="doc">
<pre class="source">
density
</pre>
</div>
</div>
<div class="field"><h4 id="filter">
<button class="show-code">Code</button>
<a href="../box2d/Filter.html">Filter</a>         <strong>filter</strong> <a class="anchor-link"
            href="#filter"
            title="Permalink to FixtureDef.filter">#</a>
        </h4>
        <div class="doc">
<pre class="source">
filter
</pre>
</div>
</div>
<div class="field"><h4 id="friction">
<button class="show-code">Code</button>
num         <strong>friction</strong> <a class="anchor-link"
            href="#friction"
            title="Permalink to FixtureDef.friction">#</a>
        </h4>
        <div class="doc">
<pre class="source">
friction
</pre>
</div>
</div>
<div class="field"><h4 id="isSensor">
<button class="show-code">Code</button>
bool         <strong>isSensor</strong> <a class="anchor-link"
            href="#isSensor"
            title="Permalink to FixtureDef.isSensor">#</a>
        </h4>
        <div class="doc">
<pre class="source">
isSensor
</pre>
</div>
</div>
<div class="field"><h4 id="restitution">
<button class="show-code">Code</button>
num         <strong>restitution</strong> <a class="anchor-link"
            href="#restitution"
            title="Permalink to FixtureDef.restitution">#</a>
        </h4>
        <div class="doc">
<pre class="source">
restitution
</pre>
</div>
</div>
<div class="field"><h4 id="shape">
<button class="show-code">Code</button>
<a href="../box2d/Shape.html">Shape</a>         <strong>shape</strong> <a class="anchor-link"
            href="#shape"
            title="Permalink to FixtureDef.shape">#</a>
        </h4>
        <div class="doc">
<pre class="source">
shape
</pre>
</div>
</div>
<div class="field"><h4 id="userData">
<button class="show-code">Code</button>
Object         <strong>userData</strong> <a class="anchor-link"
            href="#userData"
            title="Permalink to FixtureDef.userData">#</a>
        </h4>
        <div class="doc">
<pre class="source">
userData
</pre>
</div>
</div>
</div>
        </div>
        <div class="clear"></div>
        </div>
        <div class="footer">
          
        </div>
        <script async src="../client-live-nav.js"></script>
        </body></html>
        
